<%@ page import="com.u1s1.entity.Users" %><%--
  Created by IntelliJ IDEA.
  User: 15941
  Date: 2020/2/22
  Time: 18:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改用户信息</title>
    <style>
        tr {
            height: 30px;
        }

        td {
            padding: 10px;
        }
    </style>
</head>
<body>
<% Users user = (Users) request.getAttribute("user");%>
<form action="<%=request.getContextPath()%>updatedo" method="post">
    <input type="hidden" name="id" value="<%=user.getId()%>"/>
    <table style="margin-left: 100px;padding: 50px;border: 1px #ccc solid;width :400px">
        <%
            String note = (String) request.getAttribute("note"); //注意这里不是getparameter！不是getparameter！不是getparameter！！！
            if (note != null && !"".equals(note)) {
        %>
        <tr>
            <td style="text-align:right; color: red; font-weight: bolder;"><%=note%>
            </td>
        </tr>
        <%
            }
        %>
        <tr>
            <td style="text-align:right">用户名:</td>
            <td style="text-align:left"><input type="text" name="name" value="<%=user.getName()%>"/></td>
        </tr>
        <tr>
            <td style="text-align:right">用户房间号:</td>
            <td style="text-align:left"><input type="text" name="address" value="<%=user.getAddress()%>"/></td>
        </tr>
        <tr>
            <td style="text-align:right">用户电话:</td>
            <td style="text-align:left"><input type="text" name="phone_number" value="<%=user.getPhoneNumber()%>"/></td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center">
                <input type="submit" value="修改用户"/>
            </td>
        </tr>


    </table>
</form>
</body>
</html>
